import qs from 'qs'

export default ({
    service,
    request,
    serviceForMock,
    requestForMock,
    mock,
    faker,
    tools
}) => ({
    // 获取管理员列表
    GetAdmin (data = {}) {
        return request({
            headers: {
                // 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
                'Content-Type': 'application/x-www-form-urlencoded'
            },
            url: '/admin',
            method: 'get',
            params: data
        })
    },
    // 获取地图数据
    GetMapData (data = {}) {
        return request({
            headers: {
                // 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
                'Content-Type': 'application/json'
            },
            url: '/web/pub/school/count', // http://jkm.ztengit.com/api/web/pub/school/count
            method: 'post',
            data: qs.stringify(data)
        })
    },
})
